package com.webSite.demo.cy.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.webSite.demo.cy.bean.HomeAbout;

@Mapper
public interface HomeAboutMapper {

	/**
	 * 寻找最新插入的一条数据
	* @Title: findLimitOne  
	* @param @return    参数  
	* @return HomeAbout    返回类型  
	* @throws
	 */
	@Select(value="select * from home_about order by id desc limit 1")
	HomeAbout findLimitOne();
	
	/**
	 * 插入一条记录
	* @Title: insertHomeAbout  
	* @param @param about
	* @param @return    参数  
	* @return int    返回类型  
	* @throws
	 */
	@Insert(value="insert into home_about (content,created,updated) value (#{content},#{created},#{updated})")
	int insertHomeAbout(HomeAbout about);
	
	/**
	 * 修改记录(暂时未用)
	* @Title: updateHomeAbout  
	* @param @param about
	* @param @return    参数  
	* @return int    返回类型  
	* @throws
	 */
	@Update(value="update home_about set content=#{content} created=#{created},updated=#{updated} where id=#{id}")
	int updateHomeAbout(HomeAbout about);
}
